package app.services.impl;

import app.models.CH;
import app.repositories.CHRepository;
import app.repositories.Repository;
import app.services.CHService;
import br.com.caelum.vraptor.ioc.Component;

@Component
public class CHServiceImpl extends GenericServiceImpl<CH, Long>implements CHService {

	private final CHRepository repository;
	
	public CHServiceImpl(CHRepository repository){
		this.repository = repository;
		super.setGenericRepository((Repository<CH, Long>) repository);
	}
	
	public CH findLastCH(){
		return repository.findLastCH();
	}
	
	public CH findByConvenioId(Integer convenioId){
		return repository.findByConvenioId(convenioId);
	}
	
}
